/**
 * Created by Freeman on 2016/8/12.
 */
import React, {PropTypes} from 'react'
import './css/toolbar.css'
const Toolbar = (props) => {

    const {isPublishing, publishArticle} = props;
    return (
        <ul className="toolbar clearfix">
            <li><a data-original-title="撤销"><i className="fa fa-undo"></i></a></li>
            <li>
                <a data-original-title="重做"> <i className="fa fa-repeat"></i> </a></li>
            <li className="pull-right">
                <a onClick={publishArticle} disabled={isPublishing}>
                    <i className="fa fa-mail-forward"></i> 发布文章
                </a>
            </li>
        </ul>
    )

};
Toolbar.propTypes = {
    isPublishing:PropTypes.bool.isRequired,
    publishArticle:PropTypes.func.isRequired
};

export default Toolbar